package com.smartstate.ems.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Data
@TableName("permission")
public class Permission {

    /**
     * 主键ID
     */
    @TableId(type = IdType.INPUT)
    @TableField(value = "ID", fill = FieldFill.INSERT)
    private String id;

    /**
     *父级ID
     */
    @TableField(value = "parentId", fill = FieldFill.INSERT)
    private String parentId;



    /**
     * 子级ID
     */
    @TableField(value = "childId", fill = FieldFill.INSERT)
    private String childId;


    /**
     * 权重
     */
    @TableField(value = "SORT", fill = FieldFill.INSERT)
    private String sort;


    /**
     * 权限名称
     */
    @ApiModelProperty(value = "权限名称")
    @TableField(value = "NAME", fill = FieldFill.INSERT)
    private String name;

    /**
     * 权限编码
     */
    @ApiModelProperty(value = "权限编码")
    @TableField(value = "CODE", fill = FieldFill.INSERT)
    private String code;

    /**
     * 路径
     */
    @ApiModelProperty(value = "路径")
    @TableField(value = "URL_PATH", fill = FieldFill.INSERT)
    private String urlPath;

    /**
     * 父级权限
     */
    @ApiModelProperty(value = "路径")
    @TableField(value = "PID", fill = FieldFill.INSERT)
    private String pid;

    /**
     * 菜单类型
     */
    @ApiModelProperty(value = "菜单类型")
    @TableField(value = "TYPE", fill = FieldFill.INSERT)
    private Integer type;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @TableField(value = "CREATE_USER", fill = FieldFill.INSERT)
    private String createUser;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT)
    private Date  updateTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新人")
    @TableField(value = "UPDATE_USER", fill = FieldFill.INSERT)
    private String  updateUser;



    /**
     * 图标
     */
    @ApiModelProperty(value = "图标")
    @TableField(value = "ICON", fill = FieldFill.INSERT)
    private String icon;

//    /**
//     * 创建时间
//     */
//    @ApiModelProperty(value = "创建时间")
//    @TableField(value = "createTime", fill = FieldFill.INSERT)
//    private String createTime;


    /**
     * 图标
     */
    @ApiModelProperty(value = "组件")
    @TableField(value = "component", fill = FieldFill.INSERT)
    private String component;

//    /**
//     * 状态
//     */
//    @ApiModelProperty(value = "状态")
//    @TableField(value = "STATUS", fill = FieldFill.INSERT)
//    private String status;


        /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    @TableField(value = "state", fill = FieldFill.INSERT)
    private String state;

    /**
     * 状态
     */
    @ApiModelProperty(value = "isWeb  1 是App ,0是pc")
    @TableField(value = "IS_WEB", fill = FieldFill.INSERT)
    private String isWeb;

    @Transient
    @TableField(exist = false)
    List<Permission> list;

}
